'use strict';
module.exports = {
	/**
	 * XXXnameXXX
	 * @url client/timedTask/pub/test 前端调用的url参数地址
	 * data 请求参数
	 * @param {String} params1  参数1
	 */
	main: async (event) => {
		let { data = {}, userInfo, util, filterResponse, originalParam } = event;
		let { customUtil, uniID, config, pubFun, vk, db, _ } = util;
		let { uid } = data;

		// 业务逻辑开始-----------------------------------------------------------


		let res = await vk.baseDao.selects({
			dbName: "bidding-session",
			pageIndex: 1,
			getMain: true,
			pageSize: 20,
			whereJson: {
				place_id: '65955d61fe975f47a5214efe'
			},
			groupJson: {
				_id: "$status", // _id是分组id（_id:为固定写法，必填属性），这里指按user_id字段进行分组
				status: _.$.first("$status"), // 这里是为了把user_id原样输出
			},
		});

		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}
